

<!DOCTYPE html><html lang="en"><head>
   <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
    <title>Disciplinary Meeting</title></head><body>
    
<audio controls="controls" controlsList="nodownload" id='test' autoplay="autoplay" oncontextmenu="return false" />

</body></html>

<script>
var xhr = new XMLHttpRequest();
xhr.open("post","/mp3",true);
xhr.responseType = "blob";
xhr.onload = function(e) {
    //兄弟 重点来了。
    if(this.status == 200){//响应码200
        //获取blob对象
        var blob = this.response;
        //获取blob对象地址，并赋值给容器
        document.getElementById("test").src = URL.createObjectURL(blob);
    }
}
//如需提交数据（比如用于验证、流媒体id之类的东西）可以在send里面加
xhr.send();
</script>
